########################
########################
###Summary Statistics###
########################
########################


###############
###SC Models###
###############
#Set working library
setwd("~/OneDrive - Indiana University/FromGoogle/AfroGrid/Ghana/Code_6_4_25/data/")
#Read dataset
ghana.dat.s <- read.csv("ghandatsc.csv")

#acled_mil_tot
c(min(ghana.dat.s$acled_mil_tot, na.rm=TRUE),median(ghana.dat.s$acled_mil_tot, na.rm=TRUE),mean(ghana.dat.s$acled_mil_tot, na.rm=TRUE),max(ghana.dat.s$acled_mil_tot, na.rm=TRUE),sd(ghana.dat.s$acled_mil_tot, na.rm=TRUE))
#population
c(min(ghana.dat.s$population, na.rm=TRUE),median(ghana.dat.s$population, na.rm=TRUE),mean(ghana.dat.s$population, na.rm=TRUE),max(ghana.dat.s$population, na.rm=TRUE),sd(ghana.dat.s$population, na.rm=TRUE))
#bdist3
c(min(ghana.dat.s$bdist3, na.rm=TRUE),median(ghana.dat.s$bdist3, na.rm=TRUE),mean(ghana.dat.s$bdist3, na.rm=TRUE),max(ghana.dat.s$bdist3, na.rm=TRUE),sd(ghana.dat.s$bdist3, na.rm=TRUE))
#NL_sum
c(min(ghana.dat.s$NL_sum, na.rm=TRUE),median(ghana.dat.s$NL_sum, na.rm=TRUE),mean(ghana.dat.s$NL_sum, na.rm=TRUE),max(ghana.dat.s$NL_sum, na.rm=TRUE),sd(ghana.dat.s$NL_sum, na.rm=TRUE))
#p_avg
c(min(ghana.dat.s$p_avg, na.rm=TRUE),median(ghana.dat.s$p_avg, na.rm=TRUE),mean(ghana.dat.s$p_avg, na.rm=TRUE),max(ghana.dat.s$p_avg, na.rm=TRUE),sd(ghana.dat.s$p_avg, na.rm=TRUE))
#t_c_avg
c(min(ghana.dat.s$t_c_avg, na.rm=TRUE),median(ghana.dat.s$t_c_avg, na.rm=TRUE),mean(ghana.dat.s$t_c_avg, na.rm=TRUE),max(ghana.dat.s$t_c_avg, na.rm=TRUE),sd(ghana.dat.s$t_c_avg, na.rm=TRUE))
#acled_battle_state
c(min(ghana.dat.s$acled_battle_state, na.rm=TRUE),median(ghana.dat.s$acled_battle_state, na.rm=TRUE),mean(ghana.dat.s$acled_battle_state, na.rm=TRUE),max(ghana.dat.s$acled_battle_state, na.rm=TRUE),sd(ghana.dat.s$acled_battle_state, na.rm=TRUE))


##################
###Panel Models###
##################
#Read dataset
ghan.burk.dat <- read.csv("ghandatts.csv")

#acled_mil_tot
c(min(ghan.burk.dat$acled_mil_tot, na.rm=TRUE),median(ghan.burk.dat$acled_mil_tot, na.rm=TRUE),mean(ghan.burk.dat$acled_mil_tot, na.rm=TRUE),max(ghan.burk.dat$acled_mil_tot, na.rm=TRUE),sd(ghan.burk.dat$acled_mil_tot, na.rm=TRUE))
#invbdist
c(min(ghan.burk.dat$invbdist, na.rm=TRUE),median(ghan.burk.dat$invbdist, na.rm=TRUE),mean(ghan.burk.dat$invbdist, na.rm=TRUE),max(ghan.burk.dat$invbdist, na.rm=TRUE),sd(ghan.burk.dat$invbdist, na.rm=TRUE))
#logpop
c(min(ghan.burk.dat$logpop, na.rm=TRUE),median(ghan.burk.dat$logpop, na.rm=TRUE),mean(ghan.burk.dat$logpop, na.rm=TRUE),max(ghan.burk.dat$logpop, na.rm=TRUE),sd(ghan.burk.dat$logpop, na.rm=TRUE))
#logNTL
c(min(ghan.burk.dat$logNTL, na.rm=TRUE),median(ghan.burk.dat$logNTL, na.rm=TRUE),mean(ghan.burk.dat$logNTL, na.rm=TRUE),max(ghan.burk.dat$logNTL, na.rm=TRUE),sd(ghan.burk.dat$logNTL, na.rm=TRUE))
#logprec
c(min(ghan.burk.dat$logprec, na.rm=TRUE),median(ghan.burk.dat$logprec, na.rm=TRUE),mean(ghan.burk.dat$logprec, na.rm=TRUE),max(ghan.burk.dat$logprec, na.rm=TRUE),sd(ghan.burk.dat$logprec, na.rm=TRUE))
#t_c_avg
c(min(ghan.burk.dat$t_c_avg, na.rm=TRUE),median(ghan.burk.dat$t_c_avg, na.rm=TRUE),mean(ghan.burk.dat$t_c_avg, na.rm=TRUE),max(ghan.burk.dat$t_c_avg, na.rm=TRUE),sd(ghan.burk.dat$t_c_avg, na.rm=TRUE))
#acled_battle_state
c(min(ghan.burk.dat$acled_battle_state, na.rm=TRUE),median(ghan.burk.dat$acled_battle_state, na.rm=TRUE),mean(ghan.burk.dat$acled_battle_state, na.rm=TRUE),max(ghan.burk.dat$acled_battle_state, na.rm=TRUE),sd(ghan.burk.dat$acled_battle_state, na.rm=TRUE))
#NDVI_mean
c(min(ghan.burk.dat$NDVI_mean, na.rm=TRUE),median(ghan.burk.dat$NDVI_mean, na.rm=TRUE),mean(ghan.burk.dat$NDVI_mean, na.rm=TRUE),max(ghan.burk.dat$NDVI_mean, na.rm=TRUE),sd(ghan.burk.dat$NDVI_mean, na.rm=TRUE))
#spei
c(min(ghan.burk.dat$spei, na.rm=TRUE),median(ghan.burk.dat$spei, na.rm=TRUE),mean(ghan.burk.dat$spei, na.rm=TRUE),max(ghan.burk.dat$spei, na.rm=TRUE),sd(ghan.burk.dat$spei, na.rm=TRUE))
#cropland_loose_portion
c(min(ghan.burk.dat$cropland_loose_portion, na.rm=TRUE),median(ghan.burk.dat$cropland_loose_portion, na.rm=TRUE),mean(ghan.burk.dat$cropland_loose_portion, na.rm=TRUE),max(ghan.burk.dat$cropland_loose_portion, na.rm=TRUE),sd(ghan.burk.dat$cropland_loose_portion, na.rm=TRUE))


